<!--
        Copyright (c) 2023, LXMS (lxinet.cn).

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<template>
  <lx-modal
      ref="lxModal"
      v-model:isShow="isShow"
      :title="title"
      :confirm-loading="loading"
      width="800px"
      @open="handleOpen"
      cancelText="关闭"
      :cancelButtonProps="{type: 'primary'}"
      :okButtonProps="{type: 'primary',style:{display:'none'}}"
  >

    <template #modalBody>
      <a-descriptions
          bordered
          :column="{ xs: 1, sm: 1, md: 1}"
      >
        <a-descriptions-item label="ID" :labelStyle="labelStyle">{{item.id}}</a-descriptions-item>
        <a-descriptions-item label="登录账号" :labelStyle="labelStyle">{{item.account}}</a-descriptions-item>
        <a-descriptions-item label="登录类型" :labelStyle="labelStyle">
          <a-tag v-if="item.loginType === 0" color="green">账号密码登录</a-tag>
          <a-tag v-if="item.loginType === 1" color="cyan">手机号密码登录</a-tag>
          <a-tag v-if="item.loginType === 2" color="blue">手机号验证码登录</a-tag>
        </a-descriptions-item>
        <a-descriptions-item label="登录IP" :labelStyle="labelStyle">{{item.ip}}</a-descriptions-item>
        <a-descriptions-item label="操作系统" :labelStyle="labelStyle">{{item.os}}</a-descriptions-item>
        <a-descriptions-item label="浏览器" :labelStyle="labelStyle">{{item.userAgent}}</a-descriptions-item>
        <a-descriptions-item label="登录结果" :labelStyle="labelStyle">
          <a-tag v-if="item.status === 0" color="red">登录失败</a-tag>
          <a-tag v-else color="green">登录成功</a-tag>
        </a-descriptions-item>
        <a-descriptions-item label="登录时间" :labelStyle="labelStyle">{{item.createTime}}</a-descriptions-item>
      </a-descriptions>
    </template>

  </lx-modal>

</template>


<script>
import lxModal from "@components/baseComponents/lxModal/index.vue";
import {detailPageMinxin} from "@/minxins/detailPageMinxin"

export default {
  name: "loginLogDetail",
  components: {
    lxModal,

  },
  mixins: [detailPageMinxin],
  data() {
    return {
      url: {},
      labelStyle: {
        width: "120px"
      }
    };
  },
  methods: {
    handleOpen() {

    },

  },
  mounted() {


  }


};
</script>

<style lang="less" scoped>

</style>